<?php

namespace App\Http\Controllers\Front;

use App\Interfaces\ShopService;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Auth,Session;

class ShopController extends Controller
{

    public function show($id,Request $request,ShopService $shopService)
    {


        $filter['stock'] = $request->get('stock')?$request->get('stock'):0;
        $filter['sort'] = $request->get('sort');

        $user=Auth::user();
        $shop = $shopService->get($id);

        $goodsPaginate = $shopService->getFitterGoodsPaginate($id,$filter['stock'],40,$filter['sort']);

        return view('front.shop.show',compact(['id','shop','goodsPaginate','filter','user']));



    }

}
